#include <Road.h>
Public Member Functions | |
| Road (RoadType theType) | |
| ~Road () | |
| osg::Vec3 | calculateCatmull (osg::Vec3 A, osg::Vec3 B, osg::Vec3 C, osg::Vec3 D, double t) |
| void | setPoints (void) |
| void | addDots () |
| void | addLines (void) |
| void | addNewPoint (osg::Vec3 pos) |
| string * | returnTextName () |
| void | geometryInitialize () |
| void | setWidthAndHeight () |
Private Attributes | |
| RoadType | type |
| float | width |
| float | length |
| osg::Vec3 | controlPointArray [MaxNUMPOINTS] |
| osg::Vec3Array * | verts |
| int | numControlPoints |
| int | numPoints |
| int | controlPointsIndex |
| osg::ref_ptr< osg::Group > | dotRoot |
| osg::ref_ptr< osg::Group > | lineRoot |
| osg::ref_ptr< LinearConstraint > | dc |
Friends | |
| class | RoadMap |
Definition at line 14 of file Road.h.
|
|
constructor takes the type as argument Definition at line 7 of file Road.cpp. References controlPointsIndex, dc, dotRoot, lineRoot, numControlPoints, numPoints, setWidthAndHeight(), type, and verts. |
|
|
|
|
|
Adds the dot geode to the dotRoot Definition at line 125 of file Road.cpp. References controlPointArray, dotRoot, and numControlPoints. Referenced by addNewPoint(). |
|
|
Adss the lines geode to the lineRoot Definition at line 84 of file Road.cpp. References lineRoot, numPoints, and verts. Referenced by addNewPoint(). |
|
|
Puts the argumen into the controlPointArray and calls the following respectively: addDots addLines
Definition at line 169 of file Road.cpp. References addDots(), addLines(), controlPointArray, numControlPoints, and setPoints(). |
|
||||||||||||||||||||||||
|
Given four points the in between points are calculated.
Definition at line 43 of file Road.cpp. Referenced by setPoints(). |
|
|
sets dc's width height and verts variables. Definition at line 194 of file Road.cpp. References dc, length, returnTextName(), verts, and width. |
|
|
Definition at line 181 of file Road.cpp. References ONE_HALF, TWO_HALFHALF_HALFHALF, and type. Referenced by geometryInitialize(). |
|
|
When a new control point is added this function is called Definition at line 65 of file Road.cpp. References calculateCatmull(), controlPointArray, controlPointsIndex, numControlPoints, numPoints, and verts. Referenced by addNewPoint(). |
|
|
according to the type of Road this function determines the width and length (for texturing purposes) of Road. Definition at line 19 of file Road.cpp. References length, ONE_HALF, TWO_HALFHALF_HALFHALF, type, and width. Referenced by Road(). |
|
|
|
|
|
control points for the Roads needed for catmull rom splines Definition at line 37 of file Road.h. Referenced by addDots(), addNewPoint(), and setPoints(). |
|
|
while calculating the spline points, this variable holds from where in the controlPointArray array to send to calculateCatmull Definition at line 59 of file Road.h. Referenced by Road(), and setPoints(). |
|
|
conjuction of two roads is handled via this variable Definition at line 75 of file Road.h. Referenced by geometryInitialize(), and Road(). |
|
|
a node that holds control points in this road object |
|
|
length of a linear feature Definition at line 31 of file Road.h. Referenced by geometryInitialize(), and setWidthAndHeight(). |
|
|
a node that holds lines draw between control points in this road object Definition at line 70 of file Road.h. Referenced by addLines(), and Road(). |
|
|
holds the number of the control points added uptonow Definition at line 48 of file Road.h. Referenced by addDots(), addNewPoint(), Road(), and setPoints(). |
|
|
holds the number of the points on the spline uptonow Definition at line 53 of file Road.h. Referenced by addLines(), Road(), and setPoints(). |
|
|
the type of the enum determines the road texture and size.. Definition at line 23 of file Road.h. Referenced by returnTextName(), Road(), and setWidthAndHeight(). |
|
|
holds all the points calculated on the spline Definition at line 42 of file Road.h. Referenced by addLines(), geometryInitialize(), Road(), and setPoints(). |
|
|
width of a linear feature Definition at line 27 of file Road.h. Referenced by geometryInitialize(), and setWidthAndHeight(). |
1.4.6-NO